{include_core file="m/lib/header.html" title="{$goods_info.title}"}
{load_js file="app/goods.js"}
{load_js file="jquery.scrollTo.min.js"}
<script>
  var goodsId = {$goods_info.id};
  var skuList = {$sku_list|json_encode};
  if (skuList.length == 1) {
    var checkedSkuId = skuList[0].id
  } else {
    var checkedSkuId = 0;
  }
  var propertyIds = {$property|json_encode};
  var stock  = {$stock};
  var flagship = {$goods_info.flagship};
  var flagship_link = '{$goods_info.flagship_link}';
</script>
{if $has_img}
<div class="swiper_over">
  <div class="swiper-container">
    <div class="swiper-wrapper clearfix">
      <div class="swiper-slide" style="background:none"></div>
        {foreach $sku_list as $k=>$v}
        {$cover = goods_helper::sku_cover($v.id)}
        <div class="swiper-slide"><img src="{_image($cover)}"  /></div>
        {/foreach}
        <div class="swiper-slide" style="background:none"></div>
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
  </div>
</div>
<!--banner end-->
{/if}
{widget model="goods" func='get_sku_list' file="m/sku_list.html" goods_id=$goods_info.id}
{if $is_promotion}
<!--吸底 begin-->
  <div id="ab_border">
    <div id="absorb" style="text-align: center;">
      {if cart_helper::can_add_cart($goods_info.id) === true}
      <a class="ab_btn1 buy-btn" href="javascript:void(0);" data-is_promotion="1">加入购物车</a>
      {/if}
    </div>
  </div>
  <!--吸底 end-->
{else}
<!--吸底 begin-->
  <div id="ab_border">
    <div id="absorb">
      {if cart_helper::can_add_cart($goods_info.id) === true}
      <a class="ab_btn1 car-btn" href="javascript:void(0);">加入购物车</a>
      {/if}
      <a class="ab_btn2 buy-btn" href="javascript:void(0);" data-is_direct_buy="1">立即购买</a>
      <div class="ab_cart">
        <a href="{AnUrl('cart')}"><img src="{$smarty.const.STATIC_URL}/images/m2-images/buy-car.png"/></a>
        <p>购物车</p>
      </div>
    </div>
  </div>
  <!--吸底 end-->
{/if}
{* {if $has_img}
<div class="sku-page2">
  <ul class="js_skuList">
    {foreach $sku_list as $k=>$v}
    <li data-id="{$v.id}">
      {$cover = goods_helper::sku_cover($v.id)}
      <span class="img-box"><img src="{_image($cover)}" width="92" height="92"></span>
      <span class="tit">{$v.title}</span>
      <span class="price">￥：{$v.price}</span>
    </li>
    {/foreach}
  </ul>
  <div class="btns" data-type="img"><a href="javascript:;">确认下单</a></div>
</div>
{else}
<div class="sku-page">
  <ul>
    {foreach $sku_list as $k=>$v}
      <label><li><input type="radio" class="js_sku" name="sku" value="{$v.id}"/><span class="radio"></span>{$v.title}</li></label>
    {/foreach}
  </ul>
  <div class="btns" data-type="no_img"><a href="javascript:void(0)">确认下单</a></div>
</div>
{/if} *}
<!--end sku-page-->

{* <script>
var is_promotion = {$is_promotion};
$(function(){
  $('.js_skuList>li').on('click', function(){
    $(this).addClass('curr').siblings().removeClass('curr');
    return false;
  });
  $('.btns').click(function(){
    var type = $(this).data('type');
    if (type == 'img') {
      var id = $('.js_skuList').children('.curr').data('id');
    } else {
      var id = $('.js_sku:checked').val();
    }

    if (!id) {
      showMsg('请选择要购买的产品');
    }
    addGoodsToCart(id, 1, function(data){
      if (data.info == 'ok') {
        location.href=siteUrl+"/cart";
      }
    }, is_promotion);
  })
})
</script> *}

{load_js file="swiper.min.js"}
<script>
    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        slidesPerView: 3,
        paginationClickable: true,
        spaceBetween: 30,
        width: 700
    });

    window.onload = function(){
      swiper.slideTo(1, 0, false);
      if(swiper.activeIndex == 0){
        $('.swiper-pagination').css('width', '699px');
        $('.swiper_over').css('margin-left', '-4%');
      }
    }
</script>

<script language="JavaScript" type="text/javascript"><!--
/* You may give each page an identifying name, server, and channel on
the next lines. */
s.pageName="Nbd:sku页面:{$goods_info.title}";
s.server=""
s.channel="Nbd"
s.pageType=""
s.prop1="Nbd:sku页面";
s.prop2="Nbd:sku页面:{$goods_info.title}";
s.prop3="Nbd:sku页面:{$goods_info.title}";
s.prop4="Nbd:sku页面:{$goods_info.title}";
/* Conversion Variables */
s.campaign=""
s.state=""
s.zip=""
s.events=""
s.products=""
s.purchaseID=""
s.eVar1=""
s.eVar2=""
s.eVar3=""
s.eVar4=""
s.eVar5=""
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code)//--></script>
<script language="JavaScript" type="text/javascript"><!--
if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')
//--></script><noscript><img src="http://lenovochina.122.2o7.net/b/ss/lenovo-nbd-prd/1/H.26.2--NS/0"
height="1" width="1" border="0" alt="" /></noscript><!--/DO NOT REMOVE/-->
<!-- End SiteCatalyst code version: H.26.2. -->
</div>
</div>
<div id="baiduTongji" style="display:none;">
  {setting_helper::get_value('statistics_code', 1)}
</div>
</body>
</html>
{* {include_core file="m/lib/footer.html"} *}